package com.yu.crm.domain.pojo;

import com.alibaba.fastjson.annotation.JSONType;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;

import java.io.Serializable;
import java.util.List;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 部门成员表
 * </p>
 *
 * @author donnie-bin
 * @since 2019-06-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@JSONType(orders = {"id"})
public class CrmDepartmentMember implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键", required = false)
    @TableId(value = "id", type = IdType.ID_WORKER)
    private Long id;

    @ApiModelProperty(value = "用户id", required = true)
    //@NotEmpty(message = "用户id不能为空")
    @TableField("user_id")
    private String userId;

    @ApiModelProperty(value = "员工姓名", required = true)
    @NotEmpty(message = "员工姓名不能为空")
    @TableField("member_name")
    private String memberName;

    //@ApiModelProperty(value = "工号", required = true)
    //@NotNull(message = "工号不能为空")
    @TableField("member_no")
    private String memberNo;

    @ApiModelProperty(value = "座机", required = false)
    @TableField("job_tel")
    private String jobTel;

    @ApiModelProperty(value = "电子邮件", required = false)
    @TableField("job_email")
    private String jobEmail;

    @ApiModelProperty(value = "部门id", required = false)
    @TableField("department_id")
    private Long departmentId;

    @ApiModelProperty(value = "职位id", required = false)
    @TableField("department_position_id")
    private Long departmentPositionId;

    @ApiModelProperty(value = "员工状态 member_status", required = true)
    @NotNull(message = "员工状态 member_status不能为空")
    @TableField("member_status")
    private Integer memberStatus;

    @ApiModelProperty(value = "创建时间", required = false)
    @TableField("gmt_create")
    private LocalDateTime gmtCreate;

    @ApiModelProperty(value = "修改时间", required = false)
    @TableField("gmt_modified")
    private LocalDateTime gmtModified;

    @ApiModelProperty(value = "是否已删除 yes_no", required = false)
    @TableField("is_deleted")
    private Integer isDeleted;


    /*--------------------user property start-------------------*/

    @ApiModelProperty(value = "用户头像文件Url", required = false)
    @TableField(exist = false)
    //@NotEmpty(message = "头像不能为空")
    private String userAvatarUrl;

    @ApiModelProperty(value = "用户性别 user_sex", required = false)
    @TableField(exist = false)
    //@NotNull(message = "性别不能为空")
    private Integer userSex;

    @ApiModelProperty(value = "用户出生日期 yyyy-MM-dd", required = false)
    @TableField(exist = false)
    //@NotEmpty(message = "出生日期不能为空")
    private String userBirthday;

    @ApiModelProperty(value = "用户认证手机号", required = true)
    @TableField(exist = false)
    //@NotEmpty(message = "手机号不能为空")
    private String userPhone;

    /*--------------------user property end-------------------*/

    /*--------------------------兼岗位及角色---------------------------*/
    @ApiModelProperty(value = "兼岗位列表", required = false)
    @TableField(exist = false)
    private List<CrmDepartmentPosition> otherPositionList;

    @ApiModelProperty(value = "角色列表", required = false)
    @TableField(exist = false)
    private List<CrmRole> roleList;

    @ApiModelProperty(value = "查询条件", required = false)
    @TableField(exist = false)
    private String condition;

    @ApiModelProperty(value = "岗位名称", required = false)
    @TableField(exist = false)
    private String positionName;
}
